//
//  RENetworkTool.h
//  ReelEp
//
//  Created by 孙强 on 2024/7/8.
//  Copyright © 2024 RE. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"


typedef void(^successBlock)(id responseObject);
typedef void(^errorBlock)(NSError *error);
typedef void(^ZZloginBlock)(NSInteger type);
typedef void(^GJCompletionBlock)(BOOL success, id result, NSString * errorMsg);


NS_ASSUME_NONNULL_BEGIN

@interface RENetworkTool : NSObject


+ (void)POSTString:(NSString *)urlStr andParam:(id)param andBlock:(successBlock)success andError:(errorBlock)failure;

+ (void)GETString:(NSString *)urlStr andParam:(id)param andBlock:(successBlock)success andError:(errorBlock)failure;

/**
 不会弹出提示弹框,适合统计类等不影响APP主线功能的接口
 */
+ (void)POSTNOToastString:(NSString *)urlStr andParam:(id)param andBlock:(successBlock)success andError:(errorBlock)failure;

/**
 json格式的请求

 @param urlStr url
 @param param 参数
 @param success 成功
 @param failure 失败
 */
+ (void)POSTJSONString:(NSString *)urlStr andParam:(id)param andBlock:(successBlock)success andError:(errorBlock)failure;

+ (void)POSTImageString:(NSString *)urlStr andParam:(id)param andImage:(UIImage *)image  andBlock:(successBlock)success andError:(errorBlock)failure;

@end

NS_ASSUME_NONNULL_END
